<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="./css/normalize.css">
    <link rel="stylesheet" href="./css/index.css">
    <title>Barcode</title>
</head>

<body>
<div id="app">
    <div class="item" :style="itemStyle" v-for="v in size" :key="v">
        <div class="title">{{data.title}}</div>
        <div class="content">
            <div class="text">
                <div><span>规格</span></div>
                <div><span>{{data.specification}}</span></div>
            </div>
            <div class="barcode">
                <img :id="'barcode'+ v" :style="imgStyle"/>
            </div>
        </div>
    </div>
    <div class="action" v-if="!printing">
        <div class="size" :class="{active:size===12}" @click="changeSize(12)">大(12个/张)</div>
        <div class="size" :class="{active:size===24}" @click="changeSize(24)">中(24个/张)</div>
        <div class="size" :class="{active:size===44}" @click="changeSize(44)">小(44个/张)</div>
        <div class="button" @click="print">打印预览</div>
    </div>
</div>
<script src="./js/JsBarcode.all.min.js"></script>
<script src="./js/vue.global.prod.min.js"></script>
<script src="./js/index.js"></script>
</body>

</html>